CON

  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000


var

  long stack[50]

pub go

  cognew(cog, @stack)

  dira[0]~~

  repeat
    !outa[0]
    waitcnt(cnt + clkfreq)

pub cog

  dira[0]~
  dira[1]~~

  repeat
    outa[1] := ina[0]
  